package com.bjtu.laorenyouhao.event.utils;

import com.bjtu.laorenyouhao.event.feign.GuanliyuanFeignService;
import com.bjtu.laorenyouhao.event.feign.LaorenFeignService;
import com.bjtu.laorenyouhao.event.feign.YigongFeignService;
import com.bjtu.laorenyouhao.event.feign.YuangongFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class RenyuanUtils {

    public static Integer getLaorenId(String name, LaorenFeignService laorenFeignService) {
        Integer renyuanId = null;

        renyuanId = (Integer) laorenFeignService.getLaorenId(name).get("laorenId");

        return renyuanId;
    }

    public static Integer getYigongId(String name, YigongFeignService yigongFeignService) {
        Integer renyuanId = null;

        renyuanId = (Integer) yigongFeignService.getYigongId(name).get("yigongId");

        return renyuanId;
    }

    public static Integer getYuangongId(String name, YuangongFeignService yuangongFeignService) {
        Integer renyuanId = null;

        renyuanId = (Integer) yuangongFeignService.getYuangongID(name).get("yuangongId");

        return renyuanId;
    }

    public static Integer getRoomId(String name,GuanliyuanFeignService guanliyuanFeignService) {
        return (Integer) guanliyuanFeignService.getRoomId(name).get("roomId");
    }
}
